import { MyRequestOptions,HttpResponse } from './type';
import request from '@/utils/api/request';

export const queryFreeBuyActivity = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/queryFreeBuyActivity`;
  return request.get(option);
};

export const storeQualification = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/storeQualification`;
  return request.get(option);
};


export const pageFreeSpu = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/pageFreeSpu`;
  return request.get(option);
};

export const deleteFreeSpu = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/deleteFreeSpu`;
  return request.post(option);
};
export const insertFreeSpu = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/insertFreeSpu`;
  return request.post(option);
};

export const storeJoinActivity = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/storeJoinActivity`;
  return request.post(option);
};


export const storeJoinFlag = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/storeJoinFlag`;
  return request.get(option);
};

export const listUserCoupons = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/listUserCoupons`;
  return request.get(option);
};
export const publishFreeOrder = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/publishFreeOrder`;
  return request.post(option);
};
export const pageUserFreeOrder = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/pageUserFreeOrder`;
  return request.get(option);
};
export const pageUserCoupous = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/pageUserCoupous`;
  return request.get(option);
};
export const queryJoinDetailBySonOrder = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/queryJoinDetailBySonOrder`;
  return request.get(option);
};
export const pageCanFreeOrder = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/activity/pageCanFreeOrder`;
  return request.get(option);
};
